import { S } from '../../s';
import { IPSDEWizard } from './ipsdewizard';
import { IPSDEWizardForm } from './ipsdewizard-form';
import { IPSDEWizardStep } from './ipsdewizard-step';
import { IPSLanguageRes } from '../../res/ipslanguage-res';
import { PSModelObjectImpl } from '../../psmodel-object-impl';

export class PSDEWizardImpl extends PSModelObjectImpl implements IPSDEWizard {
  get codeName(): string {
    return this.M.codeName;
  }

  get finishCapLanResTag(): string {
    return this.M.finishCapLanResTag;
  }

  protected finishcappslanguageres: IPSLanguageRes;
  getFinishCapPSLanguageRes(): IPSLanguageRes | null {
    return (
      this.finishcappslanguageres ||
      (this.finishcappslanguageres = this.fillObjectModel(
        S._276,
        this.M.getFinishCapPSLanguageRes,
        S._330,
      ) as IPSLanguageRes)
    );
  }

  get finishCaption(): string {
    return this.M.finishCaption;
  }

  protected firstpsdewizardform: IPSDEWizardForm;
  getFirstPSDEWizardForm(): IPSDEWizardForm | null {
    return (
      this.firstpsdewizardform ||
      (this.firstpsdewizardform = this.fillObjectModel(
        S._211,
        this.M.getFirstPSDEWizardForm,
        S._331,
      ) as IPSDEWizardForm)
    );
  }

  get nextCapLanResTag(): string {
    return this.M.nextCapLanResTag;
  }

  protected nextcappslanguageres: IPSLanguageRes;
  getNextCapPSLanguageRes(): IPSLanguageRes | null {
    return (
      this.nextcappslanguageres ||
      (this.nextcappslanguageres = this.fillObjectModel(
        S._276,
        this.M.getNextCapPSLanguageRes,
        S._332,
      ) as IPSLanguageRes)
    );
  }

  get nextCaption(): string {
    return this.M.nextCaption;
  }

  protected psdewizardforms: IPSDEWizardForm[];
  getPSDEWizardForms(): IPSDEWizardForm[] | null {
    return (
      this.psdewizardforms ||
      (this.psdewizardforms = this.fillChildListModel(
        this.M.getPSDEWizardForms,
        S._211,
      ) as IPSDEWizardForm[])
    );
  }

  findPSDEWizardForm(objKey: any): IPSDEWizardForm | null {
    return this.getPSModel5(
      S._211,
      this.getPSDEWizardForms(),
      objKey,
    ) as IPSDEWizardForm;
  }

  protected psdewizardsteps: IPSDEWizardStep[];
  getPSDEWizardSteps(): IPSDEWizardStep[] | null {
    return (
      this.psdewizardsteps ||
      (this.psdewizardsteps = this.fillChildListModel(
        this.M.getPSDEWizardSteps,
        S._213,
      ) as IPSDEWizardStep[])
    );
  }

  findPSDEWizardStep(objKey: any): IPSDEWizardStep | null {
    return this.getPSModel5(
      S._213,
      this.getPSDEWizardSteps(),
      objKey,
    ) as IPSDEWizardStep;
  }

  get prevCapLanResTag(): string {
    return this.M.prevCapLanResTag;
  }

  protected prevcappslanguageres: IPSLanguageRes;
  getPrevCapPSLanguageRes(): IPSLanguageRes | null {
    return (
      this.prevcappslanguageres ||
      (this.prevcappslanguageres = this.fillObjectModel(
        S._276,
        this.M.getPrevCapPSLanguageRes,
        S._333,
      ) as IPSLanguageRes)
    );
  }

  get prevCaption(): string {
    return this.M.prevCaption;
  }

  get wizardStyle(): 'DEFAULT' | 'STYLE2' | 'STYLE3' | 'STYLE4' {
    return this.M.wizardStyle;
  }

  get enableMainStateLogic(): boolean {
    return this.M.enableMainStateLogic != null
      ? this.M.enableMainStateLogic
      : false;
  }

  get stateWizard(): boolean {
    return this.M.stateWizard;
  }
  get cls(): string {
    return 'PSDEWizardImpl';
  }
  instanceof(cls: string): boolean {
    if (cls == S._212) return true;
    return super.instanceof(cls);
  }
}
